package com.gimi.cloud.bbp.manage.controller.mall;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.gimi.cloud.bbp.common.enums.ResponseCodeEnum;
import com.gimi.cloud.bbp.common.utils.reqhead.Response;
import com.gimi.cloud.bbp.dto.mall.MallMessageDTO;
import com.gimi.cloud.bbp.manage.service.mall.MallMessageService;

@RestController
@RequestMapping("/mall/message")
public class MallMessageController {
	
	@Autowired private MallMessageService service;
	
	/**
	 * 推送消息到用户消息中心
	 * @param dto
	 * @throws Exception
	 */
	@RequestMapping("/sendMessage")
	public Response sendMessage(@RequestBody MallMessageDTO dto, HttpServletResponse response) throws Exception {
		service.sendMessage(dto);
		return new Response(ResponseCodeEnum.SUCCESSED);
	}
	
	

}
